import api from '../api.js'
//获取课堂列表
export function getClassList(pageIndex, pageSize, domain = `[('categ_id','in',[7,8,9])]`, order = '', search = '') {
	return api.postPubileApi('cms.news', '_api_public_teach_page', {
		page: pageIndex,
		limit: pageSize,
		domain,
		order,
		search
	})
}
//获取课堂详情
export function getClassDetail(uids,id) {
	return api.postPubileApi('cms.news', '_api_public_teach_one', {
		uids:uids,
		cms_id: id
	})
}
//修改点击数
export function writeVideoClick(id) {
	// return api.postFunction('cms.news', '_api_teach_click', {
	// 	cms_id: id
	// })
	return api.postFunction3('cms.news', '_api_public_teach_click', {
		cms_id: id
	})
}
//获取课堂分类
export function getSortList() {
	return api.postPubileApi('cms.news', '_api_public_teach_category_subject')
}
//视频记忆接口
export function videoHistoryMemory(news, time, uid, lang) {
	return api.postPubileApi('jhj.video.history', '_api_public_jhj_video_history_memory', {
		news,
		time,
		uid,
		lang
	})
}
// export function videoHistoryList(page, limit, uid) {
// 	return api.postPubileApi('jhj.video.history', '_api_public_jhj_video_history_list', {
// 		page,
// 		limit,
// 		uid
// 	})
// }
export function videoHistoryList(uid) {
	return api.postPubileApi('jhj.video.history', '_api_public_jhj_video_history_list', {
		uid
	})
}
